<script setup lang="ts">
const props = defineProps(["modelValue"]);
const $emit = defineEmits(["update:modelValue"]);

const handler = () => {
  $emit("update:modelValue", props.modelValue + 100);
};
</script>

<template>
  <div class="child">
    <h1>子组件曹植: {{ modelValue }}</h1>
    <button @click="handler">更新钱数</button>
  </div>
</template>

<style scoped>
.child {
  width: 400px;
  height: 290px;
  background: bisque;
  padding: 0.5rem;
}
</style>
